from abc import ABCMeta, abstractmethod


class MyIterable(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def absmethod(self, x, y):
        pass


class Foo(MyIterable):
    def absmethod(self, x, y):
        print(x - y)


if __name__ == "__main__":
    # 抽象基类
    # 虚拟子类
    # 是否归属
    #MyIterable.register(Foo)
    bol_sub = issubclass(Foo, MyIterable)

    mycmd = Foo()
    mycmd.absmethod(8,5)
